﻿<view:ModuleView x:Class="UCOLOR.View.VProductView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    xmlns:system="clr-namespace:System;assembly=mscorlib"
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
    xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
    xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
    xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/charts"
    xmlns:helpers="clr-namespace:UCOLOR.Helpers" 
    xmlns:local="clr-namespace:UCOLOR.App.Extend"
    xmlns:view="clr-namespace:UCOLOR.View"
             mc:Ignorable="d" 
             d:DesignHeight="800" d:DesignWidth="1118" FontWeight="Bold" Focusable="True" xmlns:dxb="http://schemas.devexpress.com/winfx/2008/xaml/bars">
    <view:ModuleView.Resources>
        <local:ScalablePaddingConverter x:Key="ScalablePaddingConverter"/>
        <helpers:StringFormatConverter x:Key="StringFormatConverter" />
        <helpers:ImageSourceConverter x:Key="ImageSourceConverter" />
        
        <Style x:Key="VerticalTile" TargetType="dxlc:Tile">
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
            <Setter Property="Size" Value="Small" />
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate />
                </Setter.Value>
            </Setter>
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel>
                            <Image Source="{Binding}" Stretch="None" />
                            <TextBlock Text="{Binding Path=Header, RelativeSource={RelativeSource AncestorType=dxlc:Tile}}" FontSize="14" Margin="0,5,0,0" HorizontalAlignment="Center" />
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
        <Style x:Key="HorizontalTile" TargetType="dxlc:Tile">
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
            <Setter Property="Size" Value="Large" />
            <Setter Property="HeaderTemplate">
                <Setter.Value>
                    <DataTemplate />
                </Setter.Value>
            </Setter>
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Image Source="{Binding}" Stretch="None" />
                            <TextBlock Text="{Binding Path=Header, RelativeSource={RelativeSource AncestorType=dxlc:Tile}}" FontSize="14" Margin="20,0,0,0" VerticalAlignment="Center" />
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
        <Style x:Key="FlatTile" TargetType="dxlc:Tile">
            <Setter Property="Size" Value="Large" />
            <Setter Property="Padding" Value="0" />
            <Setter Property="VerticalHeaderAlignment" Value="Stretch" />
            <Setter Property="ContentTemplate">
                <Setter.Value>
                    <DataTemplate>
                        <StackPanel>
                            <Image Source="{Binding}" Stretch="None" />
                            <TextBlock Text="{Binding Path=Header, RelativeSource={RelativeSource AncestorType=dxlc:Tile}}" FontSize="24" Margin="0,5,0,0" HorizontalAlignment="Center" />
                        </StackPanel>
                    </DataTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
    </view:ModuleView.Resources>
    <Grid Name="Center" Background="#FFFFFFFF" Height="auto" >
        <Border BorderBrush="#FF515151" BorderThickness="1" Margin="10,10,10,10" Padding="5">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="329" />
                    <ColumnDefinition Width="757*" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="357" />
                    <RowDefinition Height="167*" />
                    <RowDefinition Height="244" />
                </Grid.RowDefinitions>
                <dxlc:Tile Header="" HorizontalAlignment="Left" Name="Product" VerticalAlignment="Top" Height="286" Width="329">
                    <Image />
                </dxlc:Tile>
                <Grid Name="S" Background="#FFFFFFFF" Grid.Column="1"  Grid.ColumnSpan="2" Margin="10,0,-6,4" Grid.Row="2"></Grid>
                <Border BorderBrush="#FF515151" BorderThickness="1" Margin="1,1,1,1" Padding="2" Grid.ColumnSpan="2" Grid.Row="2"></Border>
                <Label Content="名称:" Grid.Column="1" Height="28" HorizontalAlignment="Left" Margin="29,8,0,0" Name="label1" VerticalAlignment="Top" Width="44" FontSize="14" />
                <Label Content="价格:" Grid.Column="1" Height="28" HorizontalAlignment="Left" Margin="31,0,0,286" Name="label3" VerticalAlignment="Bottom" FontSize="14" />
                <Label Content="{Binding product.ProductName}" Name="ProductName" Grid.Column="1" Margin="75,7,468,320" />
                <Label Content="{Binding product.Price}" Name="ProductPrice" Grid.Column="1" Margin="75,42,468,287" />
                <Button Content="Button" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="8,9,0,0" Name="button1" VerticalAlignment="Top" Width="75" Grid.Column="1" />
                <Button Content="Button" Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="158,9,0,0" Name="button2" VerticalAlignment="Top" Width="75" />
                <Button Content="Button" Grid.Column="1" Grid.Row="1" Height="23" HorizontalAlignment="Left" Margin="292,9,0,0" Name="button3" VerticalAlignment="Top" Width="75" />
                <Button Content="Button" Grid.Column="1" Height="23" HorizontalAlignment="Left" Margin="419,9,0,0" Name="button4" VerticalAlignment="Top" Width="75" Grid.Row="1" />
                <Border BorderBrush="#FF515151" BorderThickness="1" Grid.ColumnSpan="2" Margin="10,10,-8,105" Padding="2" />
            </Grid>
        </Border>
        
    </Grid>
</view:ModuleView>
